home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / packet / p_aa4re / bb212src / bbsemai.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-02-17  |  1.4 KB  |  34 lines

  1. (*===========================================================================*)
  2. (* Semaphore control -- Initialize                                           *)
  3. (*                                                                           *)
  4. (*   Copyright 1990 by H. Roy Engehausen.  All rights reserved.              *)
  5. (*   This software may be freely distributed and used, but it may not        *)
  6. (*   under any circumstances be sold by anyone other than the author.        *)
  7. (*   It may be distributed by a commercial company as long as it is          *)
  8. (*   for no cost.                                                            *)
  9. (*                                                                           *)
  10. (*===========================================================================*)
  11.  
  12. (*===========================================================================*)
  13. (* Semaphore initialization                                                  *)
  14. (*===========================================================================*)
  15.  
  16. PROCEDURE sema_clear_all;
  17.  
  18.   VAR
  19.     init_i : BYTE;
  20.  
  21.   BEGIN;
  22.  
  23.     FOR init_i := 1 TO semaphore_max DO
  24.       WITH sem_info_array[init_i] DO
  25.         BEGIN;
  26.           process_list := NIL;
  27.           sem_status   := sem_clear;
  28.           excl_count   := 0;
  29.           time_out     := time_out_short;
  30.           last_unlock  := NIL;
  31.         END;
  32.   END;
  33.  
  34.